home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / circuits / spice2g6.z / spice2g6 / spice / Fortran / newnod.f < prev    next >
Encoding:
Text File  |  1989-02-03  |  1.8 KB  |  52 lines

  1.       subroutine newnod(nodold,nodnew,inodx,inodi,nnodi)
  2.       implicit double precision (a-h,o-z)
  3. c
  4. c     this routine makes a new node number for an element which is about
  5. c to be added to the circuit as a result of a subcircuit call.
  6. c
  7. c spice version 2g.6  sccsid=tabinf 3/15/83
  8.       common /tabinf/ ielmnt,isbckt,nsbckt,iunsat,nunsat,itemps,numtem,
  9.      1   isens,nsens,ifour,nfour,ifield,icode,idelim,icolum,insize,
  10.      2   junode,lsbkpt,numbkp,iorder,jmnode,iur,iuc,ilc,ilr,numoff,isr,
  11.      3   nmoffc,iseq,iseq1,neqn,nodevs,ndiag,iswap,iequa,macins,lvnim1,
  12.      4   lx0,lvn,lynl,lyu,lyl,lx1,lx2,lx3,lx4,lx5,lx6,lx7,ld0,ld1,ltd,
  13.      5   imynl,imvn,lcvn,nsnod,nsmat,nsval,icnod,icmat,icval,
  14.      6   loutpt,lpol,lzer,irswpf,irswpr,icswpf,icswpr,irpt,jcpt,
  15.      7   irowno,jcolno,nttbr,nttar,lvntmp
  16. c spice version 2g.6  sccsid=cirdat 3/15/83
  17.       common /cirdat/ locate(50),jelcnt(50),nunods,ncnods,numnod,nstop,
  18.      1   nut,nlt,nxtrm,ndist,ntlin,ibr,numvs,numalt,numcyc
  19. c spice version 2g.6  sccsid=blank 3/15/83
  20.       common /blank/ value(200000)
  21.       integer nodplc(64)
  22.       complex cvalue(32)
  23.       equivalence (value(1),nodplc(1),cvalue(1))
  24. c
  25. c... inodx, inodi are arrays (see subckt)
  26.       dimension inodx(1),inodi(1)
  27. c
  28.       if (nodold.ne.0) go to 5
  29.       nodnew=1
  30.       go to 20
  31.     5 do 10 i=1,nnodi
  32.       jnodx=inodx(1)
  33.       if (nodold.ne.nodplc(jnodx+i)) go to 10
  34.       jnodi=inodi(1)
  35.       nodnew=nodplc(jnodi+i)
  36.       go to 20
  37.    10 continue
  38. c
  39.       call extmem(inodx(1),1)
  40.       call extmem(inodi(1),1)
  41.       call extmem(junode,1)
  42.       nnodi=nnodi+1
  43.       ncnods=ncnods+1
  44.       jnodx=inodx(1)
  45.       nodplc(jnodx+nnodi)=nodold
  46.       jnodi=inodi(1)
  47.       nodplc(jnodi+nnodi)=ncnods
  48.       nodplc(junode+ncnods)=nodplc(junode+ncnods-1)+1
  49.       nodnew=ncnods
  50.    20 return
  51.       end
  52.